#ifndef TRIGGER_STATE_FIXTURES_H_INCLUDED
#define TRIGGER_STATE_FIXTURES_H_INCLUDED
#include <cmath>
#include "..\trigger_state.h"

class PreTrigFillingFixture
{
public:
    PreTrigFillingFixture() :
        fakeData(GROUPBYSCAN, 11, 1), tsDone(), tsArmed(&tsDone, RISING, 2.5, ChanPointer(fakeData, 0)),
        tsFull(&tsArmed, RISING, 2.5, ChanPointer(fakeData, 0)),
        tsFilling(&tsFull, 0), pTS(&tsFilling)
    {
        for(int i=0; i <11; i++)
            fakeData.getData()[i]= i - 5;
    }

    arrayHolder fakeData;
    Triggered tsDone;
    Armed tsArmed;
    PreTrigFull tsFull;
    PreTrigFilling tsFilling;
    TriggerState* pTS;
};

class TriggerFixture
{
public:
    TriggerFixture() :
        fakeData(GROUPBYSCAN, 11, 1), tsDone(), tsArmed(&tsDone, RISING, 2.5, ChanPointer(fakeData, 0)),
        tsFull(&tsArmed, RISING, 2.5, ChanPointer(fakeData, 0)),
        tsFilling(&tsFull, 3), pTS(&tsFilling)
    {
        for(int i=0; i <11; i++)
            fakeData.getData()[i]= i - 5;
    }
    arrayHolder fakeData;
    Triggered tsDone;
    Armed tsArmed;
    PreTrigFull tsFull;
    PreTrigFilling tsFilling;
    TriggerState* pTS;
};

class SineWaveFixture
{
public:
    SineWaveFixture() {
        for(int x=0; x < 40; x++)
            y[x]= -5.0 + x/4.0 + 3.0 * sin(x/2.0);
    }
    double y[40];
};



#endif // TRIGGER_STATE_FIXTURES_H_INCLUDED
